Optimal. Leaf size=147 \[ \frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \text {ArcTan}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {i b^2 \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )}{3 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5330, 4494,
4270, 4266, 2317, 2438} \begin {gather*} \frac {2 i b \text {ArcTan}\left (e^{i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )}{3 c^3}-\frac {b x^2 \sqrt {1-\frac {1}{c^2 x^2}} \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {b^2 x}{3 c^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4266
Rule 4270
Rule 4494
Rule 5330
Rubi steps
\begin {align*} \int x^2 \left (a+b \sec ^{-1}(c x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int (a+b x)^2 \sec ^3(x) \tan (x) \, dx,x,\sec ^{-1}(c x)\right )}{c^3}\\ &=\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {(2 b) \text {Subst}\left (\int (a+b x) \sec ^3(x) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2-\frac {b \text {Subst}\left (\int (a+b x) \sec (x) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {b^2 \text {Subst}\left (\int \log \left (1-i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}-\frac {b^2 \text {Subst}\left (\int \log \left (1+i e^{i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {\left (i b^2\right ) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i \sec ^{-1}(c x)}\right )}{3 c^3}\\ &=\frac {b^2 x}{3 c^2}-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x^2 \left (a+b \sec ^{-1}(c x)\right )}{3 c}+\frac {1}{3} x^3 \left (a+b \sec ^{-1}(c x)\right )^2+\frac {2 i b \left (a+b \sec ^{-1}(c x)\right ) \tan ^{-1}\left (e^{i \sec ^{-1}(c x)}\right )}{3 c^3}-\frac {i b^2 \text {Li}_2\left (-i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}+\frac {i b^2 \text {Li}_2\left (i e^{i \sec ^{-1}(c x)}\right )}{3 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.89, size = 225, normalized size = 1.53 \begin {gather*} \frac {1}{3} \left (a^2 x^3+\frac {a b \left (2 x^4 \sec ^{-1}(c x)-\frac {-c x+c^3 x^3+\sqrt {-1+c^2 x^2} \tanh ^{-1}\left (\frac {c x}{\sqrt {-1+c^2 x^2}}\right )}{c^4 \sqrt {1-\frac {1}{c^2 x^2}}}\right )}{x}+\frac {b^2 \left (c x-c^2 \sqrt {1-\frac {1}{c^2 x^2}} x^2 \sec ^{-1}(c x)+c^3 x^3 \sec ^{-1}(c x)^2-\sec ^{-1}(c x) \log \left (1-i e^{i \sec ^{-1}(c x)}\right )+\sec ^{-1}(c x) \log \left (1+i e^{i \sec ^{-1}(c x)}\right )-i \text {PolyLog}\left (2,-i e^{i \sec ^{-1}(c x)}\right )+i \text {PolyLog}\left (2,i e^{i \sec ^{-1}(c x)}\right )\right )}{c^3}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.50, size = 320, normalized size = 2.18
method | result | size |
derivativedivides | \(\frac {\frac {c^{3} x^{3} a^{2}}{3}+\frac {b^{2} \mathrm {arcsec}\left (c x \right )^{2} c^{3} x^{3}}{3}-\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{2} x^{2}}{3}+\frac {b^{2} c x}{3}+\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}-\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}-\frac {i b^{2} \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}+\frac {i b^{2} \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}+\frac {2 a b \,c^{3} x^{3} \mathrm {arcsec}\left (c x \right )}{3}-\frac {a b \left (c^{2} x^{2}-1\right )}{3 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}-\frac {a b \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{3 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}}{c^{3}}\) | \(320\) |
default | \(\frac {\frac {c^{3} x^{3} a^{2}}{3}+\frac {b^{2} \mathrm {arcsec}\left (c x \right )^{2} c^{3} x^{3}}{3}-\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c^{2} x^{2}}{3}+\frac {b^{2} c x}{3}+\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}-\frac {b^{2} \mathrm {arcsec}\left (c x \right ) \ln \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}-\frac {i b^{2} \dilog \left (1+i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}+\frac {i b^{2} \dilog \left (1-i \left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )\right )}{3}+\frac {2 a b \,c^{3} x^{3} \mathrm {arcsec}\left (c x \right )}{3}-\frac {a b \left (c^{2} x^{2}-1\right )}{3 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}}-\frac {a b \sqrt {c^{2} x^{2}-1}\, \ln \left (c x +\sqrt {c^{2} x^{2}-1}\right )}{3 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}}{c^{3}}\) | \(320\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{2} \left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,{\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________